import Vue from 'vue'
import VueRouter from 'vue-router'

const routerPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error => error)
}

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'home',
    component: ()=>import('../views/home.vue')
  },

]

const router = new VueRouter({
  routes
})

export default router